home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_vol_deathplumetemp.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  116 lines

  1. # Jones 3D Cog Script
  2. #
  3. # VOL_lavasprayw/damage.cog
  4. #
  5. # [CM]
  6. #
  7. # Random screenshakes for unstable areas.
  8. #
  9. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ========================================================================================
  12.  
  13. symbols
  14.  
  15.     message        startup
  16.     message        crossed
  17.     message        pulse
  18.     message        entered
  19.     message        exited
  20.     
  21.     thing        player                                local
  22.     thing        lavaspot                            
  23.     thing        plume                                local    #the temp cone object             
  24.     
  25.     sector        deathsect
  26.  
  27.     template    lavaspray
  28.     template    lavacone
  29.     
  30.     surface        onsurf                                linkID=1                
  31.     surface        onsurf1                                linkID=1                
  32.     surface        offsurf                                linkID=2                
  33.     surface        offsurf1                            linkID=2                
  34.    
  35.     material    coneskin=vol_a4plume_lava.mat        local
  36.  
  37.     int            spraysound                            local
  38.     int            waitstart    
  39.     int            danger=0                            local    
  40.     int            track                                local    
  41.     int            i                                    local    
  42.     
  43.     vector        blastvec
  44.     
  45.     sound        blast=olv_waterfall_blast_c.wav        local
  46.  
  47. end
  48.  
  49. # ========================================================================================
  50. code
  51.  
  52. startup:
  53.  
  54.     player = GetLocalPlayerThing();
  55.     return;
  56.  
  57. # ========================================================================================
  58.  
  59. crossed:
  60.  
  61.     If (GetSenderID() == 1) 
  62.         {
  63.             Sleep(.1);
  64.             SetPulse(6);
  65.         }
  66.         
  67.     If (GetSenderID() == 2)
  68.         {
  69.             SetPulse(0);
  70.         }
  71. return;
  72.  
  73.  
  74. # ========================================================================================
  75.  
  76. pulse:
  77.  
  78.         PlaySoundThing(blast, lavaspot, 1.0, 8, 30, 0x0);
  79.         
  80.         If (danger == 1)
  81.             {
  82.                 DamageThing(player, 600, 0x4, player);
  83.                 SetSectorThrust(deathsect, blastvec, 4);
  84.             }
  85.         
  86.         SetMaterialCel(coneskin, 0);
  87.         plume=CreateThing(lavacone, lavaspot);
  88.         track=materialanim(coneskin, 52, 0);
  89.         for (i=0; i <= 10; i = i + 1)
  90.             {
  91.                 CreateThing(lavaspray, lavaspot);
  92.                 Sleep(.025);
  93.             }
  94.         SetSectorThrust(deathsect, blastvec, 0);
  95.         DestroyThing(plume);
  96.         StopAnim(track);
  97.         #materialanim(coneskin, 6, 0);
  98. return;
  99.  
  100. # ========================================================================================
  101. entered:
  102.  
  103.     If ((GetSenderRef() == deathsect) && (GetSourceRef() == player))
  104.         danger = 1;
  105.         return;
  106. # ========================================================================================
  107. exited:
  108.  
  109.     If ((GetSenderRef() == deathsect) && (GetSourceRef() == player))
  110.         danger = 0;
  111.         return;
  112.  
  113. # ========================================================================================
  114. end
  115.  
  116.